package com.seu.me.test;

import org.joda.time.DateTime;

/**
 * Created by liangfeihu on 2018/5/30.
 */
public class MyTest6 {
    public static void main(String[] args) {
        DateTime dateTime = new DateTime("2018-12-01");
        System.out.println(dateTime.toDate());
        System.out.println(dateTime.toString("MM月dd日"));

        /*Date date = new Date();

        DateTime time = new DateTime(date.getTime());

        System.out.println(time.getDayOfWeek());

        System.out.println(time.toString("yyyy-MM-dd HH:mm:ss"));
        System.out.println(time.toString("yyyy-MM"));
        System.out.println(time.toString("yyyy"));
        System.out.println(time.getYear() + "");
        System.out.println(date.getTime());

        System.out.println(Integer.parseInt("03"));
        System.out.println(Integer.parseInt("05"));
        System.out.println(Integer.parseInt("3"));
        System.out.println(Integer.parseInt("10"));
        System.out.println("2018-03".substring(5));*/

        /*AtomicBoolean running = new AtomicBoolean(false);
        System.out.println(running.get());
        System.out.println(running.compareAndSet(false, true));


        final StringTokenizer parser = new StringTokenizer("hello|world|welcom", "|", false);
        final List<String> list = new ArrayList<String>(parser.countTokens());
        while (parser.hasMoreTokens()) {
            // 转换为大写，并添加到集合中
            list.add(parser.nextToken().toUpperCase(Locale.ENGLISH));
        }
        System.out.println(list.toString());

        String phone = "15214353029";
        System.out.println("用户" + phone.substring(0, 3) + phone.substring(phone.length()-4));

        String redisValue = "ddhua_loan_20181119182947Y5md_3";
        System.out.println(redisValue.substring(redisValue.lastIndexOf("_")));
        System.out.println(redisValue.substring(redisValue.lastIndexOf("_") + 1));*/

    }
}
